//
//  SectionOneReusableView.m
//  BigJoy
//
//  Created by 晓明罗 on 2017/6/13.
//  Copyright © 2017年 Rowling. All rights reserved.
//

#import "SectionOneReusableView.h"
#import "SDCycleScrollView.h"

@interface SectionOneReusableView()<SDCycleScrollViewDelegate>

@property (nonatomic,strong) SDCycleScrollView * cycleView;

@end

@implementation SectionOneReusableView

- (void)awakeFromNib {
    [super awakeFromNib];
    // cycleView
    [self addSubview:self.cycleView];
    [self.cycleView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.bottom.equalTo(self);
    }];
    self.cycleView.localizationImageNamesGroup = @[@"1.jpeg",@"2.jpeg",@"test.jpg"];
}

-(SDCycleScrollView *)cycleView {
    if(_cycleView == nil) {
        _cycleView = [[SDCycleScrollView alloc]init];
        _cycleView.delegate = self;
        _cycleView.autoScrollTimeInterval = 4;
        _cycleView.bannerImageViewContentMode = 2;
        _cycleView.backgroundColor = [UIColor whiteColor];
        _cycleView.pageDotColor = [UIColor clearColor];
        _cycleView.currentPageDotColor = [UIColor whiteColor];
    }
    return  _cycleView;
}

/** 点击图片回调 */
- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index {
}

@end
